//
//  YMHomeCycleScrollView.h
//  YMMedical
//
//  Created by y s on 2023/7/19.
//

#import <UIKit/UIKit.h>


@class YMHomeCycleScrollView;

@protocol YMHomeCycleScrollViewDelegate <NSObject>

@optional
- (void)cardView:(YMHomeCycleScrollView *)bannerView didSelectedAtIndex:(NSInteger)index;

- (void)cardView:(YMHomeCycleScrollView *)cardView changeCurrentIndex:(NSInteger)index;

@end

@interface YMHomeCycleScrollView : UIView

/**
 创建 Card
 */
+ (instancetype)cardViewWithFrame:(CGRect)frame
                       dataSource:(NSArray *)dataSource;

/** 数据源 */
@property (nonatomic, strong) NSArray *dataSource;

@property (nonatomic, weak) id <YMHomeCycleScrollViewDelegate> delegate;

/** 选中下标 */
@property (nonatomic, assign) NSInteger indexNow;

@end

